package com.lavender.transaction.controller;

import com.lavender.transaction.transaction.TransactionInterface;
import com.lavender.transaction.transaction.UserServiceInterface;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/transaction")
@RestController
public class TransactionTestController {

    @Autowired
    private TransactionInterface transactionInterface;

    @Autowired
    private UserServiceInterface userServiceInterface;

    // http://localhost:8081/transaction/test
    @GetMapping("test")
    public String test() {
        transactionInterface.testTransaction();
        return "ok";
    }

    // http://localhost:8081/transaction/insert
    @GetMapping("insert")
    public String insert() {
        userServiceInterface.insert();
        return "ok";
    }


}
